package com.buercorp.wangyu.file;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * 字节输入流循环读取文件中的数据
 * @author liyiyu
 */
public class FileTest02 {
    public static void main(String[] args) throws IOException {
        // 创建对象
        FileInputStream fis = new FileInputStream("src/main/resources/filejava/java2.txt");
        // 循环读取
        int b;
        while ((b = fis.read()) != -1){
            System.out.print((char) b);
        }

        // 释放资源
        fis.close();
    }
}
